<template>
    <div>
        <div>
            合并同一个session的对象
        </div>
        {{session}}
    </div>
</template>

<script>
    import Session from "../../../utils/infoJs";

    export default {
        name: "session",
        data(){
            return{
                session:'',
                a:{
                    a1:'a1',a2:'a2',a3:'a3'
                },
                b:{
                    b1:'b1',b2:'b2',b3:'b3'
                },
            }
        },
        created() {
            let session = new Session();
            session.setSessionInfo('abc',this.a)
            let info=session.findSessionInfo('abc')
            Object.keys(info).forEach(item=>{
                this.b[item]=info[item]
            })
            session.setSessionInfo('abc',this.b)
            this.session=session.findSessionInfo('abc')
            console.log(session.findSessionInfo('abc'))
        },
    }
</script>

<style scoped>

</style>